-
-
Notifications
You must be signed in to change notification settings - Fork 319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix(Task/Ext/Archive/ZipTask): Preseves directories' permissions in zip #1820
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1820 +/- ##
============================================
+ Coverage 53.55% 53.57% +0.01%
- Complexity 9806 9813 +7
============================================
Files 495 495
Lines 24194 24209 +15
============================================
+ Hits 12958 12970 +12
- Misses 11236 11239 +3 ☔ View full report in Codecov by Sentry. |
Hi, Thanks for your contribution! I'd like to make this behavior optional (i.e. controlled by an attribute). The attribute should default to false because we're changing behavior. The attribute should also be documented in the guide and the RNG grammar. When that's all done, it'll be added to the 3.1 release line (not 3.0). |
I am ok with that, though, something annoys me with letting the current working as default. Having files inheriting permissions but not directories ; it is more a bug than a feature. When dealing with such zip archives in a unix/Linux system, unzipped with the I'd propose some alternative instead with a The
See: the
|
@mrook Implemented a |
3d921b4
to
b15083e
Compare
Even Copilot says my code is smart ;)
|
See: - Implementation: phingofficial/phing#1820 - Issue: phingofficial/phing#1817
Fix phingofficial#1817 When file permissions are supported, stores directories's original permissions as `ZipArchive::OPSYS_UNIX` `ExternalAttribute`.
By default false when omitted, file permissions attribute are not saved. When setting the savefileattributes to true, files permissions are savec as external attributes in the Zip archive. Example: ```xml <zip includeemptydirs="true" destfile="${project.basedir}/test.zip" basedir="./dir" savefileattributes="true"> <fileset dir="dir"> <include name="**/**"/> </fileset> </zip> ```
ZipArchive::setMtimeIndex (PHP >= 8.0.0, PECL zip >= 1.16.0)
I'll take a look at this soon. Sorry for not having had the time earlier. |
@leagris would you mind to add a test case please? |
Fix #1817 When file permissions are supported, stores directories' original permissions as
ZipArchive::OPSYS_UNIX
ExternalAttribute
.